package com.zlm.user.emp.service.impl;

import com.zlm.common.base.AbstractBaseService;
import com.zlm.common.constants.UserConstants;
import com.zlm.common.entity.SysFeedbackDO;
import com.zlm.user.emp.dao.SysFeedbackDao;
import com.zlm.user.emp.service.SysFeedbackService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

/**
 * @Author: duyufu
 * @Date: 2019/6/18 16:28
 */
@Service
public class SysFeedbackServiceImpl extends AbstractBaseService<SysFeedbackDao, SysFeedbackDO> implements SysFeedbackService {

    @Autowired
    @Override
    public void setBaseDao(SysFeedbackDao sysFeedbackDao) {
        this.baseDao = sysFeedbackDao;
    }

    @Transactional(rollbackFor = Exception.class)
    @Override
    public void saveMemAgencyFavourite(SysFeedbackDO feedback) {
        feedback.setIdentitys(UserConstants.USER_TYPE_EMP);
        baseDao.saveMemAgencyFavourite(feedback);
    }
}
